package org.sanm.webSocket;

import com.fasterxml.jackson.annotation.JsonValue;

public enum MessageType {
    HEART("HEART", "心跳"),
    PERSON("PERSON", "私聊"),
    ROOM("ROOM", "群聊"),
    CREATE_ROOM("CREATE_ROOM", "创建房间"),
    JOIN_ROOM("JOIN_ROOM", "加入房间"),
    EXIT_ROOM("EXIT_ROOM", "离开房间"),
    MEMBER_JOIN("MEMBER_JOIN", "有人加入房间"),
    MEMBER_EXIT("MEMBER_EXIT", "有人离开房间"),
    MEMBER_LIST("MEMBER_LIST", "成员列表"),
    NOTICE("NOTICE", "通知公告");
    @JsonValue
    private final String value;
    private final String desc;

    MessageType(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }
}
